﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Wicresoft.UnifyShow.Business;
using Microsoft.Practices.Unity;

namespace Wicresoft.UnifyShow.Portal.Controllers
{
    public class BasicInfoTablePartialViewController : BaseController
    {
        private ISiteBranchAndDeviceAndAlert siteBranchAndDeviceAndAlert;

        [InjectionConstructor]
        public BasicInfoTablePartialViewController(ISiteBranchAndDeviceAndAlert isiteBranchAndDeviceAndAlert)
        {
            siteBranchAndDeviceAndAlert = isiteBranchAndDeviceAndAlert;
        }
        protected override void Dispose(bool disposing)
        {
            ((IDisposable)siteBranchAndDeviceAndAlert).Dispose();
        }

        public ActionResult BasicInfoTablePartialView(int siteID, int? businesssystemID)
        {
            int userID = 4;
            //int.TryParse(User.Identity.Name, out userID);

            SiteBranchAndDeviceTypeAlertModel model = siteBranchAndDeviceAndAlert.getSiteBranchAndDeviceAndAlert(siteID, businesssystemID, userID);
            return PartialView(model);
            
        }

    }
}
